﻿using System.Web.Mvc;
using System.Web.Routing;
using Web.Infrastructure;
using Web.Infrastructure.Core;
using Web.Infrastructure.Core.Theme;

namespace Web
{
    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            AppStart.Config();
            ThemeManager.Config();
            ControllerBuilder.Current.SetControllerFactory(new IoCControllerFactory());
            GlobalFilters.Filters.Add(new LogHandleErrorAttribute());
            AreaRegistration.RegisterAllAreas();
            RouteConfig.RegisterRoutes(RouteTable.Routes);
        }
    }
}